#pragma once

#include "form/IMenu.h"
#include "Control.h"

class Menu :public Control<IMenu>
{
public:
	BEGIN_DEFINE_CLASS(CLSID_Menu)
		DEFINE_INTERFACE_ENTRY(IMenu)
		USE_INTERFACE_ENTRY(Control<IMenu>)
	END_DEFINE_CLASS()

	Menu();
	virtual ~Menu();

	virtual void SetPath(const String& value) { m_path = value; }
	virtual const String& GetPath() const { return m_path; }
	virtual void SetTargetFrame(kTargetFrame value) {m_frame = value;}
	virtual kTargetFrame GetTargetFrame() const {return m_frame;}
	virtual bool IsPopup() const {return GetCommandID()==0U;}

private:
	String m_path;
	kTargetFrame m_frame;
};
AUTO_REGISTER_CLASSMAP_ENTRY(Menu)
